package com.center.biz.impl;

import com.center.api.model.EduWebsiteCourseDetail;
import com.center.api.remote.RemoteEduWebsiteCourseDetailService;
import com.center.biz.dao.EduWebsiteCourseDetailMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service(version = "1.0",interfaceClass = RemoteEduWebsiteCourseDetailService.class)
public class RemoteEduWebsiteCourseDetailServiceImpl implements RemoteEduWebsiteCourseDetailService {

    @Autowired
    private EduWebsiteCourseDetailMapper eduWebsiteCourseDetailMapper;

    @Override
    public int save(EduWebsiteCourseDetail eduWebsiteCourseDetail) {
        return eduWebsiteCourseDetailMapper.insertSelective(eduWebsiteCourseDetail);
    }

    @Override
    public int update(EduWebsiteCourseDetail eduWebsiteCourseDetail) {
        return eduWebsiteCourseDetailMapper.updateByPrimaryKeySelective(eduWebsiteCourseDetail);
    }

    @Override
    public int delete(int id) {
        return eduWebsiteCourseDetailMapper.deleteByPrimaryKey(id);
    }

    @Override
    public List<EduWebsiteCourseDetail> select(EduWebsiteCourseDetail eduWebsiteCourseDetail) {
        return null;
    }

    @Override
    public EduWebsiteCourseDetail getById(int id) {
        return eduWebsiteCourseDetailMapper.selectByPrimaryKey(id);
    }
}
